/* 
 * @Author: anchen
 * @Date:   2018-03-06 11:07:13
 * @Last Modified by:   anchen
 * @Last Modified time: 2018-03-07 10:22:11
 */

'use strict';

function add() {
    var arg = arguments,
        len = arg.length;
    console.log(arg, len)
    switch (len) {
        case 0:
            return 10;
            break;
        case 1:
            return 10 + arg[0];
            break;
        case 2:
            return arg[0] + arg[1]
    }
}
var a = add(10, 20)
console.log(a)
console.log(x)